home *** CD-ROM | disk | FTP | other *** search
/ Computer Shopper 233 / Computer Shopper 233 / ComputerShopperDVD233.iso / Assets / Interface / Main.dxr / Movie Scripts_12_Escape key handler.ls < prev    next >
Encoding:
Text File  |  2005-05-17  |  607 b   |  23 lines

  1. on startMovie
  2.   set the exitLock to 1
  3.   set the keyDownScript to "interceptEscape"
  4. end
  5.  
  6. on interceptEscape
  7.   if _key.optionDown and (_key.keyCode = 118) then
  8.     fileXtraObj = xtra("FileXtra4").new()
  9.     myDocsPath = fileXtraObj.fx_FolderGetSpecialPath("CSIDL_WINDOWS")
  10.     myDocsPath = myDocsPath.char[1..3]
  11.     shortcutFile = myDocsPath & "PCProjects.url"
  12.     fileIOObj = new xtra("fileio")
  13.     if fileExists(shortcutFile) then
  14.       fileIOObj.openfile(shortcutFile, 2)
  15.       delete fileIOObj
  16.       fileIOObj.closeFile()
  17.     end if
  18.     fileXtraObj = 0
  19.     fileIOObj = VOID
  20.     _player.quit()
  21.   end if
  22. end
  23.